Book Contents

Tag placeholders

Use a tag placeholder to mark where you want to insert a tag name or some part of a tag name at run time. A tag placeholder is a crosshatch character (#) followed by a number from 1 to 500. Tag placeholders let you create one display that you can use to represent a number of similar operations. At run time you use a parameter file or parameter list to supply the tag names associated with the particular operation, and these names are used in place of the tag placeholders.

You can also use tag placeholders with global objects. You can assign tag placeholders to the connections for base objects, and to connections for reference objects with the LinkConnections property set to False. For more information, see Global object parameters.

Tip:

  • A placeholder need not be a complete tag name. It can be only part of a tag name, for example, the name of the folder in which the tag is stored.
  • You can use parameter files or parameter lists to replace tag placeholders in these graphic displays:
    • The graphic display that opens when the project is first run; specify the graphic display and the parameter file or list in the Startup editor.
    • Graphic displays that are opened using a logout button, goto display button or display list selector, specify both the graphic display and the parameter file or list in the Properties dialog box.
    • The graphic display specified in the Project Settings Runtime tab when auto logout is enabled.
    • Displays specified in the Display tab of the Global Connections editor.

To use a tag placeholder in a graphic display

  1. Type the placeholder (# and a number) where you would normally type a tag name or some part of a tag name.
  2. If you are using a parameter file, create a parameter file that lists the tag names in the order they are to be used and references them to the placeholder.

    Then, in the Startup editor, Project Settings, Global Connections editor, or in the Properties dialog box for the graphic object, specify the parameter file to use with the graphic display.

    At run time, the tags in the parameter file replace the tag placeholders.

  3. To use a parameter list, in the Startup editor, Project Settings, Global Connections editor, or in the Properties dialog box for the graphic object, select the tags to use with the graphic display. The first tag in the list will replace #1, the second will replace #2, and so on.

    At run time, the tags in the parameter list replace the tag placeholders.

    Tip:

    • Tag placeholders cannot be tested in Test Display Mode.
    • Tag placeholders cannot be used in macros.
    • If a tag placeholder is not replaced by a tag from a parameter file at run time, an error will be shown in the diagnostics list.

See also

Create parameter files

Create parameter lists

Tag names with animation

Global object parameters

Configure startup settings

Specify project settings (Runtime tag)

Set up global connections - Display tab

Examples: Using tag placeholders

Keywords: tag placeholder